﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewsHtml.ascx.cs" Inherits="QuanTri_QuanTriTin_NewsHtml" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Panel runat="server" ID="pnGrid">
    <asp:LinkButton runat="server" ID="cmdAdd1" onclick="cmdAdd_Click">Thêm mới</asp:LinkButton>
    <asp:DataGrid ID="gridModule" runat="server" Width="650" AllowPaging="True" AutoGenerateColumns="False"
        CellPadding="3" BackColor="White" BorderWidth="1px" BorderStyle="Solid" BorderColor="#CCCCCC"
        DataKeyField="Id" PageSize="1000" OnItemCommand="gridModule_ItemCommand">
        <SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
        <HeaderStyle Font-Bold="True" CssClass="HeaderRow"></HeaderStyle>
        <AlternatingItemStyle CssClass="DarkRow"></AlternatingItemStyle>
        <ItemStyle CssClass="LightRow"></ItemStyle>
        <Columns>
            <asp:BoundColumn DataField="id" HeaderText="id" ItemStyle-Width="250" ItemStyle-Wrap="True"
                ItemStyle-HorizontalAlign="left"></asp:BoundColumn>
            <asp:BoundColumn DataField="tenTrang" HeaderText="Tên trang" ItemStyle-Width="250"
                ItemStyle-Wrap="True" ItemStyle-HorizontalAlign="left"></asp:BoundColumn>
            <asp:BoundColumn DataField="ghiChu" HeaderText="Ghi chú" ItemStyle-Width="250" ItemStyle-Wrap="True"
                ItemStyle-HorizontalAlign="left"></asp:BoundColumn>
            <asp:BoundColumn DataField="status" HeaderText="status" ItemStyle-Width="250" ItemStyle-Wrap="True"
                Visible="false" ItemStyle-HorizontalAlign="left"></asp:BoundColumn>
            <asp:TemplateColumn HeaderText="Sửa" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkEdit" CommandName="Edit" runat="server">
                        <asp:Image ID="imgEdit" ImageUrl="../images/edit.gif" AlternateText="Sửa" runat="server" />
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="Xóa" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkDelete" CommandName="Delete" runat="server">
                        <asp:Image ID="imgDelete" ImageUrl="../images/delete.gif" AlternateText="Xóa" runat="server"
                            onclick="javascript:return confirm('Bạn có chắc muốn xóa mục này?');" />
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateColumn>
        </Columns>
        <PagerStyle HorizontalAlign="Left" ForeColor="#000066" BackColor="White" Mode="NumericPages"
            Visible="false"></PagerStyle>
    </asp:DataGrid>
    <asp:LinkButton runat="server" ID="cmdAdd" onclick="cmdAdd_Click">Thêm mới</asp:LinkButton>
</asp:Panel>
<asp:Panel runat="server" ID="pnEdit">
    <table width="100%" class="TableStyle" cellpadding="0" cellspacing="1">
        <tr>
            <td colspan="2" align="center">
                <span class="BigLabel2" id="chiTietHoaDon">THÔNG TIN CHI TIẾT TIN</span>
            </td>
        </tr>
        <tr class="TrStyle">
            <td colspan="2" align="center">
                <asp:Label runat="server" ID="lblId"></asp:Label>
                <asp:SqlDataSource runat="server" ID="ds" 
                    ConnectionString="<%$ ConnectionStrings:DBConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"></asp:SqlDataSource>
            </td>
        </tr>
        <tr class="TrStyle">
            <td class="TdStyle" width="120" style="text-align: left">
                Tên trang</td>
            <td class="TdStyle" style="text-align: left; width: 240px;">
                <asp:TextBox runat="server" ID="txtTenTrang" Width="600px"></asp:TextBox>
            </td>
        </tr>
        <tr class="TrStyle">
            <td class="TdStyle" style="text-align: left" width="120">
                Trạng thái active
            </td>
            <td class="TdStyle" style="text-align: left; width: 240px;">
                <asp:DropDownList runat="server" ID="cboStatus">
                    <asp:ListItem Value="1" Text="Active"></asp:ListItem>
                     <asp:ListItem Value="0" Text="Disable"></asp:ListItem>
                </asp:DropDownList>
                
            </td>
        </tr>
        <tr class="TrStyle">
            <td style="height: 26px; text-align: left" width="120">
                Title
            </td>
            <td style="height: 26px; text-align: left" width="120">
                <asp:TextBox ID="txtGhiChu" runat="server" Width="600px"></asp:TextBox>
            </td>
        </tr>
        <tr class="TrStyle">
            <td style="height: 34px; text-align: left" width="120">
                Nội dung
            </td>
            <td style="height: 34px; text-align: left">
                <fckeditorv2:fckeditor id="fck" runat="server" basepath="~/fckeditor/" width="620px"
                    height="600px">
                    </fckeditorv2:fckeditor>
            </td>
        </tr>
        <tr class="TrStyle">
            <td colspan="2" style="height: 26px; text-align: center">
                <asp:Label ID="lblErrorChiTiet" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr class="TrStyle">
            <td colspan="2" style="height: 26px; text-align: center">
                <asp:Button ID="cmdCapNhatDetail" runat="server" Text="Cập nhật" OnClick="cmdCapNhatDetail_Click" />
                <asp:Button ID="cmdHuyBoDetail" runat="server" Text="Thoát" OnClick="cmdHuyBoDetail_Click" />
            </td>
        </tr>
    </table>
</asp:Panel>
